﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;

using Microsoft.SharePoint;

public partial class ws_SP_PermDocs_FileData : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        string intID_Str = Request.Params["intID"];
        int intID = Convert.ToInt32(intID_Str);
        string fileName = Request.Params["fileName"];

        DataTable tbl = new DataTable("tbl");
        Ko2.Portal.SP_List.SPList_PermDocs o = new Ko2.Portal.SP_List.SPList_PermDocs();
        Exception err = null;

        byte[] buf = null;
        err = o.GetFileData(ref buf, intID, fileName);
    
        Response.ContentType = "image/jpeg";
        if (err == null)
        {
            Response.OutputStream.Write(buf, 0, buf.Length);
        }
    }

}

